package com.hj.exam;

import java.util.Scanner;

public class Test12 {
    public static void main(String[] args) {
        System.out.println("请输入一个五位数：");
        int num=new Scanner(System.in).nextInt();
        if (num<10000||num>99999){
            System.out.println("您输入的数有误！");
        }else{
            int a=num%10;
            int b=num/10000%10;
            int c=num/10%10;
            int d=num/1000%10;
            if(a==b&&c==d){
                System.out.println("该数为回文数");
            }else {
                System.out.println("该数不为回文数");
            }
        }
    }
}